﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Digit07="clr-namespace:SegmentDisplay.Common.Digit07">


    <!--<Polygon Name="SegmentElementA" Points="15,0 9,6 35,32 93,32 119,6 113,0" Fill="{TemplateBinding SegmentA}" />
    <Polygon Name="SegmentElementB" Points="121,9 128,16 128,93 112,109 96,93 96,35"  Fill="{TemplateBinding SegmentB}"/>
    <Polygon Name="SegmentElementC" Points="112,115 128,131 128,209 122,215 96,189 96,131"  Fill="{TemplateBinding SegmentC}"/>
    <Polygon Name="SegmentElementD" Points="35,192 9,218 15,224 113,224 119,218 93,192"  Fill="{TemplateBinding SegmentD}"/>
    <Polygon Name="SegmentElementE" Points="16,115 32,131 32,189 6,215 0,209 0,131"  Fill="{TemplateBinding SegmentE}"/>
    <Polygon Name="SegmentElementF" Points="6,9 32,35 32,93 16,109 0,93 0,15"  Fill="{TemplateBinding SegmentF}"/>
    <Polygon Name="SegmentElementG" Points="35,96 19,112 35,128 93,128 109,112 93,96" Fill="{TemplateBinding SegmentG}" />-->
    
    
    <!--<Polygon Name="SegmentElementA" Points="35,0 19,16 35,32 93,32 109,16 93,0" Fill="{TemplateBinding SegmentA}" />
    <Polygon Name="SegmentElementB" Points="112,19 128,35 128,93 112,109 96,93 96,35" Fill="{TemplateBinding SegmentB}" />
    <Polygon Name="SegmentElementC" Points="112,115 128,131 128,189 112,205 96,189 96,131"  Fill="{TemplateBinding SegmentC}"/>
    <Polygon Name="SegmentElementD" Points="35,192 19,208 35,224 93,224 109,208 93,192" Fill="{TemplateBinding SegmentD}" />
    <Polygon Name="SegmentElementE" Points="16,115 32,131 32,189 16,205 0,189 0,131"  Fill="{TemplateBinding SegmentE}"/>
    <Polygon Name="SegmentElementF" Points="16,19 32,35 32,93 16,109 0,93 0,35" Fill="{TemplateBinding SegmentF}" />
    <Polygon Name="SegmentElementG" Points="35,96 19,112 35,128 93,128 109,112 93,96" Fill="{TemplateBinding SegmentG}" />-->


    <!--default 7 segments-->
    <ControlTemplate x:Key="TemplateSegment07" TargetType="{x:Type Digit07:SegmentDigit07}">
        <Viewbox>
            <Grid Height="{TemplateBinding Height}">
                <Polygon Name="SegmentElementA" Points="7,6 13,0 32,0 38,6 32,12 13,12" Fill="{TemplateBinding SegmentA}" />
                <Polygon Name="SegmentElementG" Points="7,40 13,34 32,34 38,40 32,46 13,46" Fill="{TemplateBinding SegmentG}" />
                <Polygon Name="SegmentElementD" Points="7,74 13,68 32,68 38,74 32,80 13,80" Fill="{TemplateBinding SegmentD}" />

                <Polygon Name="SegmentElementF" Points="6,7 0,13 0,33 6,39 12,33 12,13" Fill="{TemplateBinding SegmentF}" />
                <Polygon Name="SegmentElementB" Points="39,7 33,13 33,33 39,39 45,33 45,13" Fill="{TemplateBinding SegmentB}" />

                <Polygon Name="SegmentElementE" Points="6,41 0,47 0,67 6,73 12,67 12,47"  Fill="{TemplateBinding SegmentE}"/>
                <Polygon Name="SegmentElementC" Points="39,41 33,47 33,67 39,73 45,67 45,47"  Fill="{TemplateBinding SegmentC}"/>
                
                
            </Grid>
        </Viewbox>
    </ControlTemplate>

    <!--Segment7-->
    <Style  x:Key="SegmentDigit07Style"  TargetType="{x:Type Digit07:SegmentDigit07}">
        <Setter Property="Template" Value="{StaticResource TemplateSegment07}" />
    </Style>

    <!--7 segments-->
    <ControlTemplate x:Key="TemplateSegment07_1" TargetType="{x:Type Digit07:SegmentDigit07}">
        <Viewbox>
            <Grid >
                <Polygon Name="SegmentElementA" Points="9,4 13,0 39,0 43,4 39,8 13,8" Fill="{TemplateBinding SegmentA}" />
                <Polygon Name="SegmentElementB" Points="44,5 48,9 46,35 42,39 38,35 40,9" Fill="{TemplateBinding SegmentB}" />
                <Polygon Name="SegmentElementC" Points="42,41 46,45 44,71 40,75 36,71 38,45" Fill="{TemplateBinding SegmentC}" />
                <Polygon Name="SegmentElementD" Points="5,76 9,72 35,72 39,76 35,80 9,80" Fill="{TemplateBinding SegmentD}" />
                <Polygon Name="SegmentElementE" Points="6,41 10,45 8,71 4,75 0,71 2,45" Fill="{TemplateBinding SegmentE}" />
                <Polygon Name="SegmentElementF" Points="8,5 12,9 10,35 6,39 2,35 4,9" Fill="{TemplateBinding SegmentF}" />
                <Polygon Name="SegmentElementG" Points="7,40 11,36 37,36 41,40 37,44 11,44" Fill="{TemplateBinding SegmentG}" />
            </Grid>
        </Viewbox>
    </ControlTemplate>

    <!--Segment7 1-->
    <Style  x:Key="SegmentDigit07Style_1"  TargetType="{x:Type Digit07:SegmentDigit07}">
        <Setter Property="Template" Value="{StaticResource TemplateSegment07_1}" />
    </Style>

    <!--7 segment morfed-->
    <ControlTemplate x:Key="TemplateSegment07_2" TargetType="{x:Type Digit07:SegmentDigit07}">
        <Viewbox>
            <Grid >
                <Polygon Name="SegmentElementA" Points="10,0 30,0 25,10 13,10 5.6,7 5.9,6 6.1,5 6.5,4 6.9,3 7.5,2 8.2,1 9,0.5" Fill="{TemplateBinding SegmentA}" />
                <Polygon Name="SegmentElementB" Points="31,0 26,10 24.2,30 28.7,34.5 32,32 34,10 34,9 34,8 34.05,7 34.1,6 34.2,5 34.1,4 34,3 33.7,2 33,1 32,0.5" Fill="{TemplateBinding SegmentB}" />
                <Polygon Name="SegmentElementC" Points="25,70 21.1,60 23.2,40 28.8,35.6 31.3,38 29.2,60 29.1,61 29,62 28.9,63 28.8,64 28.6,65 28.2,66 28,67 27.3,68 26.7,69 26,69.5" Fill="{TemplateBinding SegmentC}" />
                <Polygon Name="SegmentElementD" Points="0,62 9,60 20,60 24.1,70 10,70 7,69.8 6,69.2 5,68.9 4,68.1 3,67.2 2,66 1,64.5 0.5, 63.5" Fill="{TemplateBinding SegmentD}" />
                <Polygon Name="SegmentElementE" Points="0,61 2.5,38 5.5,35.5 10.1,40 8.3,59.5" Fill="{TemplateBinding SegmentE}" />
                <Polygon Name="SegmentElementF" Points="5.3,8.1 13,11 11.1,30 5.5,34.5 3,32" Fill="{TemplateBinding SegmentF}" />
                <Polygon Name="SegmentElementG" Points="6,35 12,30 23.2,30 28.2,35 22,40 11,40" Fill="{TemplateBinding SegmentG}" />
            </Grid>
        </Viewbox>
    </ControlTemplate>


    <!--Segment7-->
    <Style  x:Key="SegmentDigit07Style_2"  TargetType="{x:Type Digit07:SegmentDigit07}">
        <Setter Property="Template" Value="{StaticResource TemplateSegment07_2}" />
    </Style>

</ResourceDictionary>